package cn.harry.modular.achievement.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author harry
 * @公众号 Harry技术
 */
@Getter
@AllArgsConstructor
public enum AchievementStateEnums {
    UNAUDITED("0", "待审核"),
    AUDITED("1", "已审核"),
    REJECTED("2", "已拒绝");

    private final String code;
    private final String desc;

    public static String getDescByCode(String code) {
        for (AchievementStateEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return null;
    }
}
